<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <span id="spanNum">0</span>
    <script type="text/javascript" src="jquery.js"></script>
    <script>
        var timer = null;
        var totalnum = 1000;
        var beginNum = 0;
        timer = setInterval(function(){
            beginNum = beginNum + 23;
            if(beginNum >= totalnum+1){
                $("#spanNum").text(totalnum);
                clearInterval(timer);
                return;
            }
            $("#spanNum").text(beginNum);
        },34)
    </script>
</body>
</html>